home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / dateimanager / ro / install / ro-install < prev    next >
Text File  |  1996-04-07  |  7KB  |  355 lines

  1. ; $VER: RO-Install 1.20 (27.10.95)
  2. ; Original RO Installer script by Juergen Schubert <juergen@desert.sub.org>
  3. ; Rewritten by Oliver Rummeyer, inspired by MagicCX-Install ©1994 Kai Iske.
  4.  
  5. ;========================================================
  6. ; Set Strings
  7.  
  8. (set #nokick
  9. (cat "You must be using Kickstart 2.04 to use RO. Aborting!"
  10. ))
  11.  
  12. (set #nomui
  13. (cat "You need version 3.1 of MUI or better. Aborting!"
  14. ))
  15.  
  16. (set #startmsg
  17. (cat "\n\RO installation script.\n"
  18.      "This script installs RO on your Amiga.\n\n"
  19.      "Read the Documentation files for\n"
  20.      "more information on the distribution.\n"
  21.      "RO © 1994,1995 Oliver Rummeyer\n"
  22.      "All rights reserved."
  23. ))
  24.  
  25. (set #icons "Which type of icons would you like to install")
  26. (set #magicwbicons "MagicWB-Style Icons; 8 colors")
  27. (set #classicicons "Classic-WB-Style Icons; 4 colors")
  28. (set #noicons "No Icons")
  29.  
  30. (set #install "\n\nInstalling RO to\n\n")
  31. (set #drawer
  32. (cat "In which disk or drawer should RO be installed?\n"
  33.      "(A drawer \"RO\" will be created there)"
  34. ))
  35.  
  36. (set #update
  37. (cat "A drawer \"RO\" already exists in the specified disk "
  38.      "or drawer. You should make a backup of your prefs "
  39.      "file before you continue the installation procedure.\n\n"
  40.      "Should I continue the installation procedure?"
  41. ))
  42.  
  43. (set #lang "Which languages should be installed?")
  44. (set #own
  45. (cat    "\n\nIf you want to create own versions of\n"
  46.     "the catalogs please have a look at the\n"
  47.     "distributions Locale directory. You will\n"
  48.     "find the .ct and .cd files there."
  49. ))
  50.  
  51. (set #install-docs "Would you like to install RO's documentation?")
  52. (set #doc "Which documentation formats would you like to install?")
  53. (set #doclang "Which language do you prefer for the documentation?")
  54.  
  55. (set #install-rexx "Would you like to install the arexx examples?")
  56. (set #drawer-rexx "In which disk or drawer should the arexx examples be installed?")
  57.  
  58. (set #exitmsg
  59. (cat "Have fun using RO.\n"
  60.      "Please support the shareware concept!\n\n"
  61.      "If you like RO, please send $20.- or DM 30.- to\n\n"
  62.      "Oliver Rummeyer\n"
  63.      "Hochbergstraße 49/1\n"
  64.      "D-88213 Ravensburg\n"
  65.      "Germany/Europe"
  66. ))
  67. ;========================================================
  68.  
  69. (if (< (/ (getversion) 65536) 37)
  70. (
  71.     (abort #nokick)
  72. ))
  73.  
  74. (if (= (exists "LIBS:muiconfig.library" (noreq)) 0)
  75. (
  76.     (abort #nomui)
  77. ))
  78.  
  79. ;=========================================================
  80.  
  81. (message #startmsg)
  82.  
  83. (complete 0)
  84.  
  85. ;=========================================================
  86.  
  87. (set IconType
  88.     (askchoice
  89.         (prompt #icons)
  90.         (help @askchoice-help)
  91.         (choices
  92.             #magicwbicons
  93.             #classicicons
  94.             #noicons
  95.         )
  96.         (default 0)
  97.     )
  98. )
  99.  
  100. (complete 15)
  101.  
  102. ;=========================================================
  103.  
  104. (set TargetDir
  105.     (askdir
  106.         (prompt #drawer)
  107.         (default "SYS:Tools")
  108.         (help @askdir-help)
  109.     )
  110. )
  111.  
  112. (set DestDir (tackon TargetDir "RO"))
  113. (set @default-dest DestDir)
  114.  
  115. (if (= (exists DestDir) 2)
  116.    (message #update)
  117. )
  118.  
  119. (complete 30)
  120.  
  121. ;=========================================================
  122.  
  123. (makedir DestDir
  124.     (prompt #install DestDir)
  125. )
  126.  
  127. (if (= IconType 0)
  128. (
  129.        (copyfiles
  130.            (source "")
  131.         (choices "/Icons/8col/RO.info" "/Icons/8col/ROPrefs.info" "/Icons/8col/RO.guide.info" "/Icons/8col/RegForm.info")
  132.            (dest DestDir)
  133.     )
  134.     (copyfiles
  135.         (source "/Icons/8col/Drawer.info")
  136.         (dest TargetDir)
  137.         (newname "RO.info")
  138.     )
  139. ))
  140.  
  141. (if (= IconType 1)
  142. (
  143.        (copyfiles
  144.            (source "")
  145.         (choices "/Icons/4col/RO.info" "/Icons/4col/ROPrefs.info" "/Icons/4col/RO.guide.info" "/Icons/4col/RegForm.info")
  146.            (dest DestDir)
  147.     )
  148.     (copyfiles
  149.         (source "/Icons/4col/Drawer.info")
  150.         (dest TargetDir)
  151.         (newname "RO.info")
  152.     )
  153. ))
  154.  
  155. (copyfiles
  156.     (help @copyfiles-help)
  157.     (source "/Binary/RO,binary")
  158.     (dest DestDir)
  159.     (newname "RO")
  160. )
  161.  
  162. (copyfiles
  163.     (help @copyfiles-help)
  164.     (source "/Binary/ROPrefs,binary")
  165.     (dest DestDir)
  166.     (newname "ROPrefs")
  167. )
  168.  
  169. (if (= (exists "ENV:RO") 0)
  170.     (makedir "ENV:RO")
  171. )
  172. (if (= (exists "ENVARC:RO") 0)
  173.     (makedir "ENVARC:RO")
  174. )
  175.  
  176. (copyfiles
  177.     (help @copyfiles-help)
  178.     (source "/Config/RO.prefs,default")
  179.     (dest "ENVARC:RO/")
  180.     (newname "RO.prefs")
  181. )
  182.  
  183. (copyfiles
  184.     (help @copyfiles-help)
  185.     (source "/Config/RO.prefs,default")
  186.     (dest "ENV:RO/")
  187.     (newname "RO.prefs")
  188. )
  189.  
  190. (complete 45)
  191.  
  192. ;========================================================
  193. ; Install Locale
  194.  
  195. (if (AND (NOT (= (getassign "Locale") "")) (exists "libs:locale.library"))
  196. (
  197.  
  198.     (set Lang
  199.         (askoptions
  200.             (prompt #lang)
  201.             (help @askoptions-help)
  202.             (choices "Deutsch" "Français" )
  203.             (default 0)
  204.         )
  205.     )
  206.  
  207.     (if (IN Lang 0)
  208.         (copyfiles
  209.             (source "")
  210.             (choices "/Locale/Catalogs/Deutsch/ro.catalog")
  211.             (dest "LOCALE:Catalogs/Deutsch")
  212.         )
  213.     )
  214.  
  215.     (if (IN Lang 1)
  216.         (copyfiles
  217.             (source "")
  218.             (choices "/Locale/Catalogs/Français/ro.catalog")
  219.             (dest "LOCALE:Catalogs/Français")
  220.         )
  221.     )
  222.  
  223.     (message #own)
  224. ))
  225.  
  226. (complete 60)
  227.  
  228. ;========================================================
  229. ; Install ARexx Scripts
  230.  
  231. (if (askbool (help @askbool-help) (prompt #install-rexx))
  232. (
  233.     (set RexxDir
  234.     (askdir
  235.         (prompt #drawer-rexx)
  236.         (default "REXX:")
  237.         (help @askdir-help)
  238.     ))
  239.  
  240.        (copyfiles
  241.            (source "")
  242.         (choices
  243.             "/ARexx/Action.RO"
  244.             "/ARexx/AddArc.RO"
  245.             "/ARexx/ArcHandler.RO"
  246.             "/ARexx/Iconify.RO"
  247.             "/ARexx/LoadDir.RO"
  248.             "/ARexx/LoadOther.RO"
  249.             "/ARexx/PlayModule.RO"
  250.         )
  251.            (dest RexxDir)
  252.     )
  253.  
  254. ))
  255.  
  256. (complete 75)
  257.  
  258. ;=========================================================
  259. ; Install Documentation
  260.  
  261. (if (askbool (help @askbool-help) (prompt #install-docs))
  262. (
  263.  
  264.     (set doctype
  265.         (askoptions
  266.             (prompt #doc)
  267.             (help @askoptions-help)
  268.             (choices
  269.                 "AmigaGuide ® V39"
  270.             )
  271.             (default 1)
  272.         )
  273.     )
  274.  
  275.     (if (<> doctype 0)
  276.     (
  277.  
  278.         (set doclang
  279.             (askchoice
  280.                 (prompt #doclang)
  281.                 (help @askchoice-help)
  282.                 (choices
  283.                     "English"
  284.                     "Deutsch"
  285.                     "Français"
  286.                 )
  287.                 (default 0)
  288.             )
  289.         )
  290.     ))
  291.  
  292.     (if (= doctype 1)
  293.     (
  294.  
  295.         (if (= doclang 0)
  296.         (
  297.             (copyfiles
  298.                 (source "/Docs/RO.guide,english")
  299.                 (dest DestDir)
  300.                 (newname "RO.guide")
  301.             )
  302.             (copyfiles
  303.                 (source "/Docs/RegForm,english")
  304.                 (dest DestDir)
  305.                 (newname "RegForm")
  306.             )
  307.         ))
  308.  
  309.         (if (= doclang 1)
  310.         (
  311.             (copyfiles
  312.                 (source "/Docs/RO.guide,deutsch")
  313.                 (dest DestDir)
  314.                 (newname "RO.guide")
  315.             )
  316.             (copyfiles
  317.                 (source "/Docs/RegForm,deutsch")
  318.                 (dest DestDir)
  319.                 (newname "RegForm")
  320.             )
  321.         ))
  322.  
  323.         (if (= doclang 2)
  324.         (
  325.             (copyfiles
  326.                 (source "/Docs/RO.guide,francais")
  327.                 (dest DestDir)
  328.                 (newname "RO.guide")
  329.             )
  330.             (copyfiles
  331.                 (source "/Docs/RegForm,francais")
  332.                 (dest DestDir)
  333.                 (newname "RegForm")
  334.             )
  335.         ))
  336.  
  337.     ))
  338.  
  339.     (if (= doctype 0)
  340.     (
  341.         (delete    (tackon DestDir "RO.guide.info"))
  342.         (delete    (tackon DestDir "RegForm.info"))
  343.     ))
  344.  
  345. )
  346. (
  347.     (delete    (tackon DestDir "RO.guide.info"))
  348.     (delete    (tackon DestDir "RegForm.info"))
  349. ))
  350.  
  351. (complete 100)
  352.  
  353. ;==========================================================
  354. (exit #exitmsg)
  355.